<?php
class Page {
    //const ACCUEIL   = '1';
    //const CATALOG   = '2';
    //const GEOLOC    = '3';

    public static function makeHeader($_title, $page, $params=null) {
        echo "
            <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

            <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr'>
            <head>
                <title>$_title</title>
                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
		<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript; charset=UTF-8\" />
                <meta name=\"author\" content=\"Quentin\" />
		<meta name=\"title\" content=\"Rendu TLI\" />
                <meta name=\"keywords\" content=\"TLI CPE Rendu 4IRC\" />
                <meta name=\"description\" content=\"Ceci est le rendu pour le cour TLI de CPE 4IRC 09/12\" />
                <meta name=\"viewport\" content=\"initial-scale=1.0, user-scalable=no\" />

                <meta name=\"language\" content=\"fr\" />
                <style type=\"text/css\">
                    @import	\"../static/css/main.css\";
                </style>

                <script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=true\"></script>

                <script type=\"text/javascript\" src=\"../static/js/map.js\"></script>

            </head>";

        if($page == 3)
	{
            echo"<body onload=\"initializeMap(";
	    if($params["lat"] != null && $params["lng"] != null)
		echo $params["lat"].",".$params["lng"];
	    echo ")\">";
	}
        else
            echo"<body>";
        
        echo"<div id=\"header\">
                    <div id=\"logo\"> <img alt=\"Logo CPE\" src=\"../static/img/logo/logo.jpg\"/> </div>
                    <div id=\"menu\">
                                <div class=\"menuButton\"><a href=\"home.php\">Accueil</a></div>
                                <div class=\"menuButton\"><a href=\"region.php\">Régions de France</a></div>
                                <div class=\"menuButton\"><a href=\"geolocalisation.php\">Géolocalisation</a></div>
                    </div>
                </div>
        ";
    }

    public static function makeFooter() {
        echo "</body>
	      </html>";
    }
}
?>
